home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / lem < prev    next >
Internet Message Format  |  1995-03-31  |  6KB

  1. Path: seq!spell
  2. From: Detlef Mueller <detlef@mwhh.hanse.de>
  3. Subject:  v02i012:  lem - Lemming animation v1.1, Part01/01
  4. Newsgroups: comp.sources.hp48
  5. Keywords: lemming animation
  6. Organization: M. Witt
  7. Followup-To: comp.sys.hp48
  8. Approved: spell@seq.uncwil.edu
  9.  
  10. Checksum: 2314906768 (verify with brik -cv)
  11. Submitted-by: Detlef Mueller <detlef@mwhh.hanse.de>
  12. Posting-number: Volume 2, Issue 12
  13. Archive-name: lem/part01
  14.  
  15. BEGIN_DOC lemming.doc
  16. Hi.
  17.  
  18. It seems that I spend too much time programming this little toy :-) ...
  19. Anyway, here is an update to LEMMING version 1.1 .
  20.  
  21. The changes vs. v 1.0 are :
  22.     - sound is generated at the correct time
  23.     - align the sixth grob
  24.     - speed up
  25.     - smother animation
  26.     - shorter
  27.  
  28. It animates a little lemming :-), walking in the status line. It doesn't
  29. change the value of PICT. Once running, you can stop the program by
  30. pressing any key.
  31.  
  32. If you only want to use LEM, download LEM.ASC into your HP48, execute ASC\->
  33. and store the result into a variable.
  34.  
  35. To generate LEM, put the listings of LEM.M and LEM.S in the appropriate
  36. files, then invoke the following commandlines at the MesS-DOS prompt:
  37.  
  38.     rplcomp lem.s lem.a
  39.     sasm -e -N lem.a
  40.     sload -H lem.m
  41.  
  42. This should generate the file 'LEM' (size 308 bytes, no extension). After
  43. being downloaded to your HP48, 'LEM' should be 307.5 bytes in size with a
  44. checksum of #F3FA. If nothing went wrong, 'LEM' is now executable.
  45.  
  46. BTW, this program is named 'lemming' because I got the animation sequence
  47. from a game called 'Lemmings'. In the game the actors are called so,
  48. because they're walking straight forward (and fall out of the screen if
  49. you don't stop them) and can be manipulated indirect only.
  50.  
  51. Have a good time,
  52.     8-), Detlef
  53.  
  54. P.S.    If there are any questions feel free to mail me.
  55.  
  56. Here are the listings:
  57. END_DOC
  58.  
  59. BEGIN_SRC lem.m
  60. SUpress XRef
  61. OUtput lem
  62. LLu lem.lr
  63. SEarch entries.o
  64. RElocate lem.o
  65. END_SRC
  66.  
  67. BEGIN_SRC lem.s
  68. *****************************************************************************
  69. * Modulname:    Lemming
  70. * Modultype:    User level secondary
  71. * Dest.Comp.:    HP48
  72. * Language:    System RPL
  73. * Author:    Detlef Mueller,Nibelungenweg 6,2000 Hamburg 56
  74. * Interface:    LEM    ( --> )
  75. * Description:
  76. * Edition History :
  77. *    1.000    08-11-1991    DM    Alpha version
  78. *      001    09-19-1991    DM    Fix grob, smoth animation
  79. *****************************************************************************
  80.  
  81.     TITLE    Lemming
  82.  
  83.     ASSEMBLE
  84.     NIBASC    /HPHP48-E/    Bin. download header
  85. *                GROB in RPLCOMP generates unusable
  86. *                grob definitions. This is the workaround:
  87. MKSGROB    MACRO            * x,y,gpatt - gpatt max. 80 nibbles
  88.     CON(5)    =DOGROB
  89.     CON(5)    15+(($1+7)/8)*$2*2
  90.     CON(5)    $2
  91.     CON(5)    $1
  92.     NIBHEX    $3
  93. MKSGROB    ENDM
  94.     RPL
  95.  
  96. ::
  97.     CK0NOLASTWD                ( *Std. entry* )
  98.     ClrDA1IsStat            ( *Suspend clock* )
  99.     ZEROZERO TWELVE BLANKIT        ( *Clr. part of DA1* --> #0 )
  100.     GARBAGE                ( *Force garbage collection* )
  101.     BEGIN
  102.     #1+                ( *Inc. x* )
  103.     {   ASSEMBLE            ( *Lemming images* )
  104.         MKSGROB 6,10,00C3C18381818181C181
  105.         MKSGROB 7,10,82C1C18381C1C585C2C0
  106.         MKSGROB 7,10,0041C18183C1C1E3C366
  107.         MKSGROB 6,10,0081C3C38181C181E323
  108.         MKSGROB 6,10,00C3C1C381818181C181
  109.         MKSGROB 7,10,82C1C18381818585C2C0
  110.         MKSGROB 7,10,0041C18183818183C366
  111.         MKSGROB 6,10,0081C3C381818181E323
  112.         RPL
  113.     }
  114.     OVER SEVEN #AND #1+ NTHCOMPDROP    ( *Get lem image*  #x --> #x g )
  115.     HARDBUFF 3PICK FOUR        ( #x g --> #x g hbg #x #4 )
  116.     GROB!                ( *Draw new lem* --> #x )
  117.     DUP THREE #AND #2= IT        ( *On every step ..* )
  118.     ::  THREE 400 setbeep        ( *Generate tick* )
  119.     ;
  120.     %.1 dowait            ( *Slowdown - try to rem. this :*)
  121.     GETTOUCH IT            ( *Key pressed ?*)
  122.     ::  2DROP 123            ( *Yes, signal exit* )
  123.     ;
  124.     ATTN? IT            ( *ATTN pressed ?* )
  125.     ::  DROP 123            ( *Yes, signal exit* )
  126.     ;
  127.     123 OVER#=            ( *Stop loop at x = 123* )
  128.     UNTIL DROP                ( *Drop x* )
  129.     ATTNFLGCLR FLUSHKEYS        ( *Clr attn flag, key buffer* )
  130.     ClrDAsOK                ( *Signal redraw display* )
  131. ;
  132. END_SRC
  133.  
  134. BEGIN_ASC lem.asc
  135. %%HP: T(3)A(R)F(.);
  136. "D9D2051A8113593CF14676040FD62124F502A170FED3047A20E1B2032000A000
  137. 06000000C3C18381818181C181E1B2032000A00007000082C1C18381C1C585C2
  138. C0E1B2032000A0000700000041C18183C1C1E3C366E1B2032000A00006000000
  139. 81C3C38181C181E323E1B2032000A00006000000C3C1C381818181C181E1B203
  140. 2000A00007000082C1C18381818585C2C0E1B2032000A0000700000041C18183
  141. 818183C366E1B2032000A0000600000081C3C381818181E323B21302C2305304
  142. 01BE30FED30C9B2653621EF116710409761188130D00401BE30A9226CB916D9D
  143. 20D004011920091002B141B21304B4949C7A141740CB916D9D208523011920B7
  144. 000B213026224CB916D9D204423011920B7000B213011920B7000BE0268C1704
  145. 42308605017D0044193B2130AF3F"
  146. END_ASC
  147.  
  148.  
  149. BYTES: #3FAh 307.5
  150.  
  151. BEGIN_UU lem.uue
  152. begin 644 lem
  153. M2%!(4#0X+46=+5"A&#&5PQ]D9T#P;1)"7R`:!^\]0*<"'BLP`@`*`&`````\U
  154. M'#@8&!@8'!@>*S`"``H`<```*!P<.!@<7%@L#!XK,`(`"@!P````%!P8.!P<+
  155. M/CQF'BLP`@`*`&`````8/#P8&!P8/C(>*S`"``H`8````#P</!@8&!@<&!XK:
  156. M,`(`"@!P```H'!PX&!A86"P,'BLP`@`*`'`````4'!@X&!@X/&8>*S`"``H`.
  157. M8````!@\/!@8&!@^,BLQ("P#-4`0ZP/O/<"Y8C4FX1]A%T"09Q&(,=``!+$^?
  158. MH"EBO!G6V0(-0!"1`I`!(!L4*S%`2TG)IT%Q!+P9UMD"6#(0D0)[`+`2`V(B>
  159. FQ)MAG2U`)`,1*;`'`"LQ$)$">P"P#F+(<4`D`VA0$-<`1)&S$@.S6
  160. ``
  161. end
  162. END_UU
  163.  
  164. -- 
  165. +-----------------------------------+---------------------------------------+
  166. | `.. . Looks like a fish, moves    |             Detlef Mueller            |
  167. |  like a fish, steers like a cow.` |          detlef@mwhh.hanse.de         |
  168. |  Ford in THGTTG, part II, p. 107  |...!uunet!mcsun!unido!mcshh!mwhh!detlef|
  169. +-----------------------------------+---------------------------------------+
  170.  
  171.